import { IsNumber, IsOptional, IsString, Length } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';

export class UpdateMenuDto {
  @ApiProperty({
    description: '菜单名称',
    required: false,
    example: '系统管理',
  })
  @IsString()
  @IsOptional()
  @Length(2, 20)
  name?: string;

  @ApiProperty({ description: '菜单路径', required: false, example: '/system' })
  @IsString()
  @IsOptional()
  path?: string;

  @ApiProperty({ description: '排序序号', required: false, example: 1 })
  @IsNumber()
  @IsOptional()
  order?: number;

  @ApiProperty({ description: '父级菜单ID', required: false, example: 1 })
  @IsNumber()
  @IsOptional()
  parentId?: number;
}
